package node_game

import (
	ss_meg "sanguo/protocol/ss/message"
	"time"
	"github.com/golang/protobuf/proto"
	"sanguo/cluster"
)

func ReportUserLog(userId string, pLevel int32, areaId int32) {
	
	now := time.Now().Format("2006-01-02 15:04:05")
	userLog := &ss_meg.UserLog{
		UserId:   proto.String(userId),
		ServerId: proto.Int32(areaId),
		PLevel:   proto.Int32(pLevel),
		LastTime: proto.String(now),
	}

	Infoln("report userLog", userLog)
	cluster.Brocast("dir",userLog)
	
}
